{include file='public/head'}
<body>
  
    <div class="x-body  layui-anim layui-anim-up">
        <form action="edit_param" class="layui-form-pane" id="mainForm" method="post" style="margin-right: 20px;">
            
            <input type="hidden" name="api_id" value="{$api_id}">

            

             <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">文本域</label>
                <div class="layui-input-block">
                  <textarea style="font-size: 18px;" placeholder="请输入内容" class="layui-textarea" id="param" name="param">{$data['param']}</textarea>
                </div>
              </div>


           
      <!--       <div class="layui-form-item">
                <label style="font-size: 14px;" class="layui-form-label">
                参数
                </label>
                <div class="layui-input-inline">

                    <textarea  class="layui-textarea"  id="param" name="param"  >
                            {$data['param']}
                    </textarea> -->

                 <!--    <input style="font-size: 24px;"  autocomplete="off" value="{$data['param']}" class="layui-input" id="param" lay-verify="required" name="param" placeholder="例如:id:2|name:jack" type="text"> -->
           <!--      </div>
            </div> -->

         

            <!--<div class="layui-form-item">
                <label class="layui-form-label">
                    上级菜单
                </label>
                <div class="layui-input-block">
                    <select lay-filter="aihao" name="pid" id='pid'>
                        <option value="0">0
                        </option>
                        <option value="1">1
                        </option>
                    </select>
                </div>
            </div> -->

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn"  lay-filter="toSubmit" lay-submit=""  style="margin-left: 33%">
                        提交
                    </button>
                    <button style="display: none;" class="layui-btn layui-btn-primary" id="reset" type="reset">
                        reset
                    </button>
                </div>
            </div>

        </form>
        
    </div>
</body>
{include file='public/foot'}
<script type="text/javascript">
    $(document).ready(function(){
        var form = layui.form;
        var layer = layui.layer;
        var options = {
              type:'post',           //post提交
              //url:'http://ask.tongzhuo100.com/server/****.php?='+Math.random(),   //url
              dataType:"json",        //json格式
              data:{},    //如果需要提交附加参数，视情况添加
              clearForm: false,        //成功提交后，清除所有表单元素的值
              resetForm: false,        //成功提交后，重置所有表单元素的值
              cache:false,          
              async:false,          //同步返回
              success:function(data){
                    console.log(data);
                    if(data.code==0){
                        layer.msg(data.msg);
                    }else{
                        layer.msg(data.msg,{icon:1,time:500},function(){
                            $("#reset").click();
                            x_admin_close();
                            parent.location.reload();
                        });
                    }
                  //服务器端返回处理逻辑
                },
                error:function(XmlHttpRequest,textStatus,errorThrown){
                    layer.msg('操作失败:服务器处理失败');
              }
            }; 
        // bind form using 'ajaxForm' 
        $('#mainForm').ajaxForm(options).submit(function(data){
            //无逻辑
        });
       

    });

        

</script>
